package Math类和Random类;

import java.util.Random;

public class Random类 {
    public static void main(String[] args) {
        Random r=new Random();

        for(int i=1;i<=10;i++)
        {
            int b=r.nextInt(100);
            System.out.println(b);
        }

        System.out.println("生成boolean类型的随机数"+r.nextBoolean());
        System.out.println("生成float类型的随机数"+r.nextFloat());
        System.out.println("生成double类型的随机数"+r.nextDouble());
        System.out.println("生成int类型的随机数"+r.nextInt());
        System.out.println("生成0-100int类型的随机数"+r.nextInt(100 ));
        System.out.println("生成long类型的随机数"+r.nextLong());

    }
}
